## DESCRIPTION
## Precalculus: scaling and translating functions
## ENDDESCRIPTION

## KEYWORDS('precalculus', 'scaling and translating functions')

## DBsubject('WeBWorK')
## DBchapter('WeBWorK Tutorial')
## DBsection('Fort Lewis Tutorial 2011')
## Date('01/30/2011')
## Author('Paul Pearson')
## Institution('Fort Lewis College')
## TitleText1('')
## EditionText1('')
## AuthorText1('')
## Section1('')
## Problem1('')


###########################
#  Initialization

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"AnswerFormatHelp.pl",
"parserFunction.pl",
);

TEXT(beginproblem());



###########################
#  Setup

Context("Numeric");
parserFunction(f => "sin(e*x)+5.5*pi");


$answer = Formula("f(x-2) + 1");


###########################
#  Main text

Context()->texStrings;
BEGIN_TEXT
A function \( f(x) \) is shifted to the right
\( 2 \) units and up \( 1 \) unit.  Find a formula 
for this shifted function in terms of the function
\( f(x) \).
$BR
$BR
Answer = \{ ans_rule(20) \}
\{ AnswerFormatHelp("formulas") \}
END_TEXT
Context()->normalStrings;


############################
#  Answer evaluation

$showPartialCorrectAnswers = 1;

ANS( $answer->cmp() );


############################
#  Solution

Context()->texStrings;
BEGIN_SOLUTION
${PAR}SOLUTION:${PAR}
Solution explanation goes here.
END_SOLUTION
Context()->normalStrings;

COMMENT('MathObject version.');

ENDDOCUMENT();
